package saeildamil.ch18.critical;

public class TransferThread extends Thread {
	SharedAccount sharedAccount;

	public TransferThread(SharedAccount sharedAccount) {
		this.sharedAccount = sharedAccount;
	}
	
	@Override
	public void run() {
		// 이몽룡 계좌 100만원 인출, 성춘향 계좌 100만원 입금  12번 반복
		for (int i=0; i<12; i++){
			sharedAccount.transfer(1000000);	
			
		}
	}
}
